#include <iostream>
#include <cmath>
using namespace std;

int main() {
    int n;
    cin >> n;

    double sum = 0;
    for (double i = 1; i <= n; i++)
    {
        if (i == 1)
        {
            sum += 1;
        }
        else {
            double val = pow(-1, i-1) * double(1/i);
            sum += val;
        }
    }
    printf("%.4f", sum);
    
    return 0;
}